package com.bocloud.cmp.dao;

import java.util.List;

import com.bocloud.cmp.entity.resource.StoreHost;

/**
 * 存储-宿主机DAO接口
 * 
 * @author weiwei
 * @version 1.0
 * @since 2016.12.29
 *
 */
public interface StoreHostDao {

	/**
	 * 根据宿主机ID查询
	 * 
	 * @param vhostId
	 * @param category
	 * @return
	 * @throws Exception
	 */
	public List<StoreHost> list(Long vhostId, String category) throws Exception;

	/**
	 * 保存
	 * 
	 * @param storeHost
	 * @return
	 * @throws Exception
	 */
	public StoreHost save(StoreHost storeHost) throws Exception;

	/**
	 * 更新
	 * 
	 * @param storeHost
	 * @return
	 * @throws Exception
	 */
	public boolean update(StoreHost storeHost) throws Exception;

	/**
	 * 删除
	 * 
	 * @param storeHost
	 * @return
	 * @throws Exception
	 */
	public boolean delete(StoreHost storeHost) throws Exception;

	/**
	 * 删除
	 * 
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public boolean removeByVendor(Long vendorId) throws Exception;

	/**
	 * 根据虚拟宿主机ID删除
	 * 
	 * @param vhostId
	 * @param category
	 * @return
	 * @throws Exception
	 */
	public boolean deleteByHost(Long vhostId, String category) throws Exception;

	/**
	 * 根据存储ID删除
	 * 
	 * @param storeId
	 * @return
	 * @throws Exception
	 */
	public boolean deleteByStore(Long storeId) throws Exception;
}
